
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>3.3.4.3 包:com.atguigu.dataanalasis.mapred · 大数据 bigdata_telecom_project_atguigu 课堂笔记</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content=" 李振超">
        
        
    
    <link rel="stylesheet" href="../../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-page-toc-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-prism/prism-solarizedlight.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-change_girls/girls.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-search/search.css">
                
            
                
                <link rel="stylesheet" href="../../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
        <link rel="stylesheet" href="../../../styles/website.css">
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="3344-53053a-com-atguigu-dataanalasis-outputformat.html" />
    
    
    <link rel="prev" href="3342-53053a-com-atguigu-dataanalasis-conversion.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    
    
        
        <li>
            <a href="http://www.atguigu.com/" target="_blank" class="custom-link">联系我们</a>
        </li>
    
    

    
    <li class="divider"></li>
    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../../">
            
                <a href="../../../">
            
                    
                    第 1 章 项目背景
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../../../chapter1.html">
            
                <a href="../../../chapter1.html">
            
                    
                    第 2 章 项目架构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../../../di-3-zhang-xiang-shi-xian.html">
            
                <a href="../../../di-3-zhang-xiang-shi-xian.html">
            
                    
                    第 3 章 项目实现
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../../31-shu-ju-sheng-cheng.html">
            
                <a href="../../31-shu-ju-sheng-cheng.html">
            
                    
                    3.1 数据生产模块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../../32-shu-ju-cai-ji-he-xiao-fei.html">
            
                <a href="../../32-shu-ju-cai-ji-he-xiao-fei.html">
            
                    
                    3.2 数据采集和消费
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.2.1" data-path="../../32-shu-ju-cai-ji-he-xiao-fei/321-shu-ju-cai-ji.html">
            
                <a href="../../32-shu-ju-cai-ji-he-xiao-fei/321-shu-ju-cai-ji.html">
            
                    
                    3.2.1 数据采集
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2.2" data-path="../../32-shu-ju-cai-ji-he-xiao-fei/322-shu-ju-xiao-fei.html">
            
                <a href="../../32-shu-ju-cai-ji-he-xiao-fei/322-shu-ju-xiao-fei.html">
            
                    
                    3.2.2 数据消费
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.2.2.1" data-path="../../32-shu-ju-cai-ji-he-xiao-fei/322-shu-ju-xiao-fei/3221-7c7b3a-propertyutil.html">
            
                <a href="../../32-shu-ju-cai-ji-he-xiao-fei/322-shu-ju-xiao-fei/3221-7c7b3a-propertyutil.html">
            
                    
                    3.2.2.1 类:PropertyUtil
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2.2.2" data-path="../../32-shu-ju-cai-ji-he-xiao-fei/322-shu-ju-xiao-fei/3222-7c7b3ahbasedao.html">
            
                <a href="../../32-shu-ju-cai-ji-he-xiao-fei/322-shu-ju-xiao-fei/3222-7c7b3ahbasedao.html">
            
                    
                    3.2.2.2 类: HBaseDao
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2.2.3" data-path="../../32-shu-ju-cai-ji-he-xiao-fei/322-shu-ju-xiao-fei/3223-7c7b3ahbaseutil.html">
            
                <a href="../../32-shu-ju-cai-ji-he-xiao-fei/322-shu-ju-xiao-fei/3223-7c7b3ahbaseutil.html">
            
                    
                    3.2.2.3 类: HBaseUtil
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2.2.4" data-path="../../32-shu-ju-cai-ji-he-xiao-fei/322-shu-ju-xiao-fei/3224-7c7b3ahbaseconsumer.html">
            
                <a href="../../32-shu-ju-cai-ji-he-xiao-fei/322-shu-ju-xiao-fei/3224-7c7b3ahbaseconsumer.html">
            
                    
                    3.2.2.4 类: HBaseConsumer
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3.2.3" data-path="../../32-shu-ju-cai-ji-he-xiao-fei/323-shu-ju-cha-xun-fang-shi-1.html">
            
                <a href="../../32-shu-ju-cai-ji-he-xiao-fei/323-shu-ju-cha-xun-fang-shi-1.html">
            
                    
                    3.2.3 数据查询方式1
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.2.3.1" data-path="../../32-shu-ju-cai-ji-he-xiao-fei/323-shu-ju-cha-xun-fang-shi-1/3231-hbasefilterutil.html">
            
                <a href="../../32-shu-ju-cai-ji-he-xiao-fei/323-shu-ju-cha-xun-fang-shi-1/3231-hbasefilterutil.html">
            
                    
                    3.2.3.1 类: HBaseFilterUtil
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2.3.2" data-path="../../32-shu-ju-cai-ji-he-xiao-fei/323-shu-ju-cha-xun-fang-shi-1/3232-7c7b3a-querywithfilter.html">
            
                <a href="../../32-shu-ju-cai-ji-he-xiao-fei/323-shu-ju-cha-xun-fang-shi-1/3232-7c7b3a-querywithfilter.html">
            
                    
                    3.2.3.2 类: QueryWithFilter
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3.2.4" data-path="../../32-shu-ju-cai-ji-he-xiao-fei/323-shu-ju-cha-xun-fang-shi-2.html">
            
                <a href="../../32-shu-ju-cai-ji-he-xiao-fei/323-shu-ju-cha-xun-fang-shi-2.html">
            
                    
                    3.2.4 数据查询方式2
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.2.4.1" data-path="../../32-shu-ju-cai-ji-he-xiao-fei/323-shu-ju-cha-xun-fang-shi-2/3241-shou-dong-cha-ru-bei-jiao-xin-xi.html">
            
                <a href="../../32-shu-ju-cai-ji-he-xiao-fei/323-shu-ju-cha-xun-fang-shi-2/3241-shou-dong-cha-ru-bei-jiao-xin-xi.html">
            
                    
                    3.2.4.1 手动写入被叫信息
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2.4.2" data-path="../../32-shu-ju-cai-ji-he-xiao-fei/323-shu-ju-cha-xun-fang-shi-2/3242-shi-yong-xie-chu-li-qi-xie-ru-bei-jiao-xin-xi.html">
            
                <a href="../../32-shu-ju-cai-ji-he-xiao-fei/323-shu-ju-cha-xun-fang-shi-2/3242-shi-yong-xie-chu-li-qi-xie-ru-bei-jiao-xin-xi.html">
            
                    
                    3.2.4.2 使用协处理器写入被叫信息
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3.2.5" data-path="../../32-shu-ju-cai-ji-he-xiao-fei/325-ba-zheng-ge-xiao-fei-mo-kuai-da-bao-dao-ji-qun-zhong-yun-xing.html">
            
                <a href="../../32-shu-ju-cai-ji-he-xiao-fei/325-ba-zheng-ge-xiao-fei-mo-kuai-da-bao-dao-ji-qun-zhong-yun-xing.html">
            
                    
                    3.2.5 把整个消费模块打包到集群中运行
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="../../33-shu-ju-fen-xi.html">
            
                <a href="../../33-shu-ju-fen-xi.html">
            
                    
                    3.3 数据分析
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.3.1" data-path="../331-xu-qiu-fen-xi.html">
            
                <a href="../331-xu-qiu-fen-xi.html">
            
                    
                    3.3.1 数据分析
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3.2" data-path="../332-mysql-biao-jie-gou-she-ji.html">
            
                <a href="../332-mysql-biao-jie-gou-she-ji.html">
            
                    
                    3.3.2 Mysql 表结构设计
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3.3" data-path="../333-huan-jing-da-jian.html">
            
                <a href="../333-huan-jing-da-jian.html">
            
                    
                    3.3.3 环境搭建
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3.4" data-path="../334-xu-qiu-shi-xian.html">
            
                <a href="../334-xu-qiu-shi-xian.html">
            
                    
                    3.3.4 需求实现
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.3.4.1" data-path="3341-53053a-com-atguigu-dataanalasis-bean.html">
            
                <a href="3341-53053a-com-atguigu-dataanalasis-bean.html">
            
                    
                    3.3.4.1 包: com.atguigu.dataanalasis.bean
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3.4.2" data-path="3342-53053a-com-atguigu-dataanalasis-conversion.html">
            
                <a href="3342-53053a-com-atguigu-dataanalasis-conversion.html">
            
                    
                    3.3.4.2 包: com.atguigu.dataanalasis.conversion
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.3.3.4.3" data-path="3343-53053a-com-atguigu-dataanalasis-mapred.html">
            
                <a href="3343-53053a-com-atguigu-dataanalasis-mapred.html">
            
                    
                    3.3.4.3 包:com.atguigu.dataanalasis.mapred
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3.4.4" data-path="3344-53053a-com-atguigu-dataanalasis-outputformat.html">
            
                <a href="3344-53053a-com-atguigu-dataanalasis-outputformat.html">
            
                    
                    3.3.4.4 包:com.atguigu.dataanalasis.outputformat
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3.4.5" data-path="3345-53053a-com-atguigu-dataanalasis-util.html">
            
                <a href="3345-53053a-com-atguigu-dataanalasis-util.html">
            
                    
                    3.3.4.5 包: com.atguigu.dataanalasis.util
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3.3.5" data-path="../335-yun-xing-ce-shi.html">
            
                <a href="../335-yun-xing-ce-shi.html">
            
                    
                    3.3.5 运行测试
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="../../34-shu-ju-zhan-shi.html">
            
                <a href="../../34-shu-ju-zhan-shi.html">
            
                    
                    3.4 数据展示
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../../.." >3.3.4.3 包:com.atguigu.dataanalasis.mapred</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="3343-&#x5305;comatguigudataanalasismapred">3.3.4.3 &#x5305;:<code>com.atguigu.dataanalasis.mapred</code></h1>
<h2 id="1-&#x7C7B;-calldriver">1. &#x7C7B;: <code>CallDriver</code></h2>
<p>&#x9A71;&#x52A8;&#x7C7B;</p>
<pre class="language-"><code class="lang-java"><span class="token keyword">package</span> com<span class="token punctuation">.</span>atguigu<span class="token punctuation">.</span>dataanalasis<span class="token punctuation">.</span>mapred<span class="token punctuation">;</span>

<span class="token keyword">import</span> com<span class="token punctuation">.</span>atguigu<span class="token punctuation">.</span>dataanalasis<span class="token punctuation">.</span>bean<span class="token punctuation">.</span>CommonDimension<span class="token punctuation">;</span>
<span class="token keyword">import</span> com<span class="token punctuation">.</span>atguigu<span class="token punctuation">.</span>dataanalasis<span class="token punctuation">.</span>outputformat<span class="token punctuation">.</span>MysqlOutput<span class="token punctuation">;</span>
<span class="token keyword">import</span> org<span class="token punctuation">.</span>apache<span class="token punctuation">.</span>hadoop<span class="token punctuation">.</span>conf<span class="token punctuation">.</span>Configuration<span class="token punctuation">;</span>
<span class="token keyword">import</span> org<span class="token punctuation">.</span>apache<span class="token punctuation">.</span>hadoop<span class="token punctuation">.</span>fs<span class="token punctuation">.</span>Path<span class="token punctuation">;</span>
<span class="token keyword">import</span> org<span class="token punctuation">.</span>apache<span class="token punctuation">.</span>hadoop<span class="token punctuation">.</span>hbase<span class="token punctuation">.</span>client<span class="token punctuation">.</span>Scan<span class="token punctuation">;</span>
<span class="token keyword">import</span> org<span class="token punctuation">.</span>apache<span class="token punctuation">.</span>hadoop<span class="token punctuation">.</span>hbase<span class="token punctuation">.</span>mapreduce<span class="token punctuation">.</span>TableMapReduceUtil<span class="token punctuation">;</span>
<span class="token keyword">import</span> org<span class="token punctuation">.</span>apache<span class="token punctuation">.</span>hadoop<span class="token punctuation">.</span>io<span class="token punctuation">.</span>Text<span class="token punctuation">;</span>
<span class="token keyword">import</span> org<span class="token punctuation">.</span>apache<span class="token punctuation">.</span>hadoop<span class="token punctuation">.</span>mapreduce<span class="token punctuation">.</span>Job<span class="token punctuation">;</span>
<span class="token keyword">import</span> org<span class="token punctuation">.</span>apache<span class="token punctuation">.</span>hadoop<span class="token punctuation">.</span>util<span class="token punctuation">.</span>Tool<span class="token punctuation">;</span>
<span class="token keyword">import</span> org<span class="token punctuation">.</span>apache<span class="token punctuation">.</span>hadoop<span class="token punctuation">.</span>util<span class="token punctuation">.</span>ToolRunner<span class="token punctuation">;</span>

<span class="token keyword">public</span> <span class="token keyword">class</span> <span class="token class-name">CallDriver</span> <span class="token keyword">implements</span> <span class="token class-name">Tool</span> <span class="token punctuation">{</span>
    <span class="token keyword">private</span> Configuration conf<span class="token punctuation">;</span>

    <span class="token annotation punctuation">@Override</span>
    <span class="token keyword">public</span> <span class="token keyword">int</span> <span class="token function">run</span><span class="token punctuation">(</span>String<span class="token punctuation">[</span><span class="token punctuation">]</span> args<span class="token punctuation">)</span> <span class="token keyword">throws</span> Exception <span class="token punctuation">{</span>
        <span class="token comment">// &#x83B7;&#x53D6;job&#x5BF9;&#x8C61;</span>
        Job job <span class="token operator">=</span> Job<span class="token punctuation">.</span><span class="token function">getInstance</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

        <span class="token comment">// &#x8BBE;&#x7F6E;&#x4E3B;&#x7C7B;</span>
        job<span class="token punctuation">.</span><span class="token function">setJarByClass</span><span class="token punctuation">(</span>CallDriver<span class="token punctuation">.</span><span class="token keyword">class</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

        <span class="token comment">// &#x8BBE;&#x7F6E; Mapper</span>
        TableMapReduceUtil<span class="token punctuation">.</span><span class="token function">initTableMapperJob</span><span class="token punctuation">(</span>
                <span class="token string">&quot;ns_telecom:calllog&quot;</span><span class="token punctuation">,</span>
                <span class="token keyword">new</span> <span class="token class-name">Scan</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">,</span>
                CallMapper<span class="token punctuation">.</span><span class="token keyword">class</span><span class="token punctuation">,</span>
                CommonDimension<span class="token punctuation">.</span><span class="token keyword">class</span><span class="token punctuation">,</span>
                Text<span class="token punctuation">.</span><span class="token keyword">class</span><span class="token punctuation">,</span>
                job<span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token comment">// &#x8BBE;&#x7F6E; Reducer</span>
        job<span class="token punctuation">.</span><span class="token function">setReducerClass</span><span class="token punctuation">(</span>CallReducer<span class="token punctuation">.</span><span class="token keyword">class</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token comment">// &#x8BBE;&#x7F6E; Output</span>
        job<span class="token punctuation">.</span><span class="token function">setOutputFormatClass</span><span class="token punctuation">(</span>MysqlOutput<span class="token punctuation">.</span><span class="token keyword">class</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        job<span class="token punctuation">.</span><span class="token function">addFileToClassPath</span><span class="token punctuation">(</span><span class="token keyword">new</span> <span class="token class-name">Path</span><span class="token punctuation">(</span><span class="token string">&quot;hdfs://hadoop201:9000/libs/mysql-connector-java-5.1.27-bin.jar&quot;</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token comment">// &#x63D0;&#x4EA4;</span>
        <span class="token keyword">return</span> job<span class="token punctuation">.</span><span class="token function">waitForCompletion</span><span class="token punctuation">(</span><span class="token boolean">true</span><span class="token punctuation">)</span> <span class="token operator">?</span> <span class="token number">0</span> <span class="token operator">:</span> <span class="token number">1</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>

    <span class="token annotation punctuation">@Override</span>
    <span class="token keyword">public</span> <span class="token keyword">void</span> <span class="token function">setConf</span><span class="token punctuation">(</span>Configuration conf<span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token keyword">this</span><span class="token punctuation">.</span>conf <span class="token operator">=</span> conf<span class="token punctuation">;</span>
    <span class="token punctuation">}</span>

    <span class="token annotation punctuation">@Override</span>
    <span class="token keyword">public</span> Configuration <span class="token function">getConf</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token keyword">return</span> <span class="token keyword">this</span><span class="token punctuation">.</span>conf<span class="token punctuation">;</span>
    <span class="token punctuation">}</span>

    <span class="token keyword">public</span> <span class="token keyword">static</span> <span class="token keyword">void</span> <span class="token function">main</span><span class="token punctuation">(</span>String<span class="token punctuation">[</span><span class="token punctuation">]</span> args<span class="token punctuation">)</span> <span class="token keyword">throws</span> Exception <span class="token punctuation">{</span>
        <span class="token keyword">int</span> run <span class="token operator">=</span> ToolRunner<span class="token punctuation">.</span><span class="token function">run</span><span class="token punctuation">(</span><span class="token keyword">new</span> <span class="token class-name">CallDriver</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">,</span> args<span class="token punctuation">)</span><span class="token punctuation">;</span>
        String s <span class="token operator">=</span> run <span class="token operator">==</span> <span class="token number">0</span> <span class="token operator">?</span> <span class="token string">&quot;&#x6B63;&#x5E38;&#x7ED3;&#x675F;&quot;</span> <span class="token operator">:</span> <span class="token string">&quot;&#x53D1;&#x751F;&#x5F02;&#x5E38;&quot;</span><span class="token punctuation">;</span>
        System<span class="token punctuation">.</span>out<span class="token punctuation">.</span><span class="token function">println</span><span class="token punctuation">(</span>s<span class="token punctuation">)</span><span class="token punctuation">;</span>
        System<span class="token punctuation">.</span><span class="token function">exit</span><span class="token punctuation">(</span>run<span class="token punctuation">)</span><span class="token punctuation">;</span>

    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre>
<h2 id="2-&#x7C7B;-callmapper">2. &#x7C7B;: <code>CallMapper</code></h2>
<pre class="language-"><code class="lang-java"><span class="token keyword">package</span> com<span class="token punctuation">.</span>atguigu<span class="token punctuation">.</span>dataanalasis<span class="token punctuation">.</span>mapred<span class="token punctuation">;</span>

<span class="token keyword">import</span> com<span class="token punctuation">.</span>atguigu<span class="token punctuation">.</span>dataanalasis<span class="token punctuation">.</span>bean<span class="token punctuation">.</span>CommonDimension<span class="token punctuation">;</span>
<span class="token keyword">import</span> com<span class="token punctuation">.</span>atguigu<span class="token punctuation">.</span>dataanalasis<span class="token punctuation">.</span>bean<span class="token punctuation">.</span>ContactDimension<span class="token punctuation">;</span>
<span class="token keyword">import</span> com<span class="token punctuation">.</span>atguigu<span class="token punctuation">.</span>dataanalasis<span class="token punctuation">.</span>bean<span class="token punctuation">.</span>DateDimension<span class="token punctuation">;</span>
<span class="token keyword">import</span> org<span class="token punctuation">.</span>apache<span class="token punctuation">.</span>hadoop<span class="token punctuation">.</span>hbase<span class="token punctuation">.</span>client<span class="token punctuation">.</span>Result<span class="token punctuation">;</span>
<span class="token keyword">import</span> org<span class="token punctuation">.</span>apache<span class="token punctuation">.</span>hadoop<span class="token punctuation">.</span>hbase<span class="token punctuation">.</span>io<span class="token punctuation">.</span>ImmutableBytesWritable<span class="token punctuation">;</span>
<span class="token keyword">import</span> org<span class="token punctuation">.</span>apache<span class="token punctuation">.</span>hadoop<span class="token punctuation">.</span>hbase<span class="token punctuation">.</span>mapreduce<span class="token punctuation">.</span>TableMapper<span class="token punctuation">;</span>
<span class="token keyword">import</span> org<span class="token punctuation">.</span>apache<span class="token punctuation">.</span>hadoop<span class="token punctuation">.</span>hbase<span class="token punctuation">.</span>util<span class="token punctuation">.</span>Bytes<span class="token punctuation">;</span>
<span class="token keyword">import</span> org<span class="token punctuation">.</span>apache<span class="token punctuation">.</span>hadoop<span class="token punctuation">.</span>io<span class="token punctuation">.</span>Text<span class="token punctuation">;</span>

<span class="token keyword">import</span> java<span class="token punctuation">.</span>io<span class="token punctuation">.</span>IOException<span class="token punctuation">;</span>
<span class="token keyword">import</span> java<span class="token punctuation">.</span>util<span class="token punctuation">.</span>HashMap<span class="token punctuation">;</span>
<span class="token keyword">import</span> java<span class="token punctuation">.</span>util<span class="token punctuation">.</span>Map<span class="token punctuation">;</span>

<span class="token keyword">public</span> <span class="token keyword">class</span> <span class="token class-name">CallMapper</span> <span class="token keyword">extends</span> <span class="token class-name">TableMapper</span><span class="token generics function"><span class="token punctuation">&lt;</span>CommonDimension<span class="token punctuation">,</span> Text<span class="token punctuation">&gt;</span></span> <span class="token punctuation">{</span>
    <span class="token keyword">private</span> Map<span class="token generics function"><span class="token punctuation">&lt;</span>String<span class="token punctuation">,</span> String<span class="token punctuation">&gt;</span></span> contacts <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">HashMap</span><span class="token operator">&lt;</span><span class="token operator">&gt;</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token keyword">private</span> Text v <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">Text</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token keyword">private</span> CommonDimension commonDimension <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">CommonDimension</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token keyword">private</span> ContactDimension contactDimension <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">ContactDimension</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token keyword">private</span> DateDimension dateDimension <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">DateDimension</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

    <span class="token comment">/**
     * &#x4EFB;&#x52A1;&#x5F00;&#x59CB;&#x7684;&#x65F6;&#x5019;&#x8C03;&#x7528;&#x4E00;&#x6B21;
     *
     * @param context
     * @throws IOException
     * @throws InterruptedException
     */</span>
    <span class="token annotation punctuation">@Override</span>
    <span class="token keyword">protected</span> <span class="token keyword">void</span> <span class="token function">setup</span><span class="token punctuation">(</span>Context context<span class="token punctuation">)</span> <span class="token keyword">throws</span> IOException<span class="token punctuation">,</span> InterruptedException <span class="token punctuation">{</span>

        contacts<span class="token punctuation">.</span><span class="token function">put</span><span class="token punctuation">(</span><span class="token string">&quot;15369468720&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;&#x674E;&#x96C1;&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        contacts<span class="token punctuation">.</span><span class="token function">put</span><span class="token punctuation">(</span><span class="token string">&quot;19920860202&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;&#x536B;&#x827A;&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        contacts<span class="token punctuation">.</span><span class="token function">put</span><span class="token punctuation">(</span><span class="token string">&quot;18411925860&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;&#x4EF0;&#x8389;&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        contacts<span class="token punctuation">.</span><span class="token function">put</span><span class="token punctuation">(</span><span class="token string">&quot;14473548449&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;&#x9676;&#x6B23;&#x60A6;&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        contacts<span class="token punctuation">.</span><span class="token function">put</span><span class="token punctuation">(</span><span class="token string">&quot;18749966182&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;&#x65BD;&#x6885;&#x6885;&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        contacts<span class="token punctuation">.</span><span class="token function">put</span><span class="token punctuation">(</span><span class="token string">&quot;19379884788&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;&#x91D1;&#x8679;&#x9716;&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        contacts<span class="token punctuation">.</span><span class="token function">put</span><span class="token punctuation">(</span><span class="token string">&quot;19335715448&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;&#x9B4F;&#x660E;&#x8273;&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        contacts<span class="token punctuation">.</span><span class="token function">put</span><span class="token punctuation">(</span><span class="token string">&quot;18503558939&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;&#x534E;&#x8D1E;&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        contacts<span class="token punctuation">.</span><span class="token function">put</span><span class="token punctuation">(</span><span class="token string">&quot;13407209608&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;&#x534E;&#x555F;&#x5029;&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        contacts<span class="token punctuation">.</span><span class="token function">put</span><span class="token punctuation">(</span><span class="token string">&quot;15596505995&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;&#x4EF2;&#x91C7;&#x7EFF;&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        contacts<span class="token punctuation">.</span><span class="token function">put</span><span class="token punctuation">(</span><span class="token string">&quot;17519874292&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;&#x536B;&#x4E39;&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        contacts<span class="token punctuation">.</span><span class="token function">put</span><span class="token punctuation">(</span><span class="token string">&quot;15178485516&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;&#x621A;&#x4E3D;&#x7EA2;&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        contacts<span class="token punctuation">.</span><span class="token function">put</span><span class="token punctuation">(</span><span class="token string">&quot;19877232369&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;&#x4F55;&#x7FE0;&#x67D4;&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        contacts<span class="token punctuation">.</span><span class="token function">put</span><span class="token punctuation">(</span><span class="token string">&quot;18706287692&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;&#x94B1;&#x6EB6;&#x8273;&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        contacts<span class="token punctuation">.</span><span class="token function">put</span><span class="token punctuation">(</span><span class="token string">&quot;18944239644&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;&#x94B1;&#x7433;&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        contacts<span class="token punctuation">.</span><span class="token function">put</span><span class="token punctuation">(</span><span class="token string">&quot;17325302007&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;&#x7F2A;&#x9759;&#x6B23;&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        contacts<span class="token punctuation">.</span><span class="token function">put</span><span class="token punctuation">(</span><span class="token string">&quot;18839074540&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;&#x7126;&#x79CB;&#x83CA;&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        contacts<span class="token punctuation">.</span><span class="token function">put</span><span class="token punctuation">(</span><span class="token string">&quot;19879419704&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;&#x5415;&#x8BBF;&#x7434;&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        contacts<span class="token punctuation">.</span><span class="token function">put</span><span class="token punctuation">(</span><span class="token string">&quot;16480981069&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;&#x6C88;&#x4E39;&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        contacts<span class="token punctuation">.</span><span class="token function">put</span><span class="token punctuation">(</span><span class="token string">&quot;18674257265&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;&#x891A;&#x7F8E;&#x4E3D;&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        contacts<span class="token punctuation">.</span><span class="token function">put</span><span class="token punctuation">(</span><span class="token string">&quot;18302820904&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;&#x5B59;&#x6021;&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        contacts<span class="token punctuation">.</span><span class="token function">put</span><span class="token punctuation">(</span><span class="token string">&quot;15133295266&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;&#x8BB8;&#x5A75;&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        contacts<span class="token punctuation">.</span><span class="token function">put</span><span class="token punctuation">(</span><span class="token string">&quot;17868457605&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;&#x66F9;&#x7EA2;&#x604B;&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        contacts<span class="token punctuation">.</span><span class="token function">put</span><span class="token punctuation">(</span><span class="token string">&quot;15490732767&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;&#x5415;&#x67D4;&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        contacts<span class="token punctuation">.</span><span class="token function">put</span><span class="token punctuation">(</span><span class="token string">&quot;15064972307&quot;</span><span class="token punctuation">,</span> <span class="token string">&quot;&#x51AF;&#x601C;&#x4E91;&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>

    <span class="token annotation punctuation">@Override</span>
    <span class="token keyword">protected</span> <span class="token keyword">void</span> <span class="token function">map</span><span class="token punctuation">(</span>ImmutableBytesWritable key<span class="token punctuation">,</span> Result value<span class="token punctuation">,</span> Context context<span class="token punctuation">)</span> <span class="token keyword">throws</span> IOException<span class="token punctuation">,</span> InterruptedException <span class="token punctuation">{</span>
        String rowKey <span class="token operator">=</span> Bytes<span class="token punctuation">.</span><span class="token function">toString</span><span class="token punctuation">(</span>key<span class="token punctuation">.</span><span class="token function">get</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        String<span class="token punctuation">[</span><span class="token punctuation">]</span> split <span class="token operator">=</span> rowKey<span class="token punctuation">.</span><span class="token function">split</span><span class="token punctuation">(</span><span class="token string">&quot;_&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token comment">// 0005_19877232369_2019-09-12 04:19:10_13407209608_2988_1</span>
        String call1 <span class="token operator">=</span> split<span class="token punctuation">[</span><span class="token number">1</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
        String startTime <span class="token operator">=</span> split<span class="token punctuation">[</span><span class="token number">2</span><span class="token punctuation">]</span><span class="token punctuation">;</span>
        String duration <span class="token operator">=</span> split<span class="token punctuation">[</span><span class="token number">4</span><span class="token punctuation">]</span><span class="token punctuation">;</span>

        <span class="token comment">// 2019-09-12 04:19:10</span>
        String year <span class="token operator">=</span> startTime<span class="token punctuation">.</span><span class="token function">substring</span><span class="token punctuation">(</span><span class="token number">0</span><span class="token punctuation">,</span> <span class="token number">4</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        String month <span class="token operator">=</span> startTime<span class="token punctuation">.</span><span class="token function">substring</span><span class="token punctuation">(</span><span class="token number">5</span><span class="token punctuation">,</span> <span class="token number">7</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        String day <span class="token operator">=</span> startTime<span class="token punctuation">.</span><span class="token function">substring</span><span class="token punctuation">(</span><span class="token number">8</span><span class="token punctuation">,</span> <span class="token number">10</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

        <span class="token comment">// &#x5C01;&#x88C5; value</span>
        v<span class="token punctuation">.</span><span class="token function">set</span><span class="token punctuation">(</span>duration<span class="token punctuation">)</span><span class="token punctuation">;</span>

        <span class="token comment">// &#x5C01;&#x88C5; key :</span>
        commonDimension<span class="token punctuation">.</span><span class="token function">setContactDimension</span><span class="token punctuation">(</span>contactDimension<span class="token punctuation">)</span><span class="token punctuation">;</span>
        commonDimension<span class="token punctuation">.</span><span class="token function">setDateDimension</span><span class="token punctuation">(</span>dateDimension<span class="token punctuation">)</span><span class="token punctuation">;</span>

        contactDimension<span class="token punctuation">.</span><span class="token function">setTelephone</span><span class="token punctuation">(</span>call1<span class="token punctuation">)</span><span class="token punctuation">;</span>
        contactDimension<span class="token punctuation">.</span><span class="token function">setName</span><span class="token punctuation">(</span>contacts<span class="token punctuation">.</span><span class="token function">get</span><span class="token punctuation">(</span>call1<span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token comment">/*
         &#x6BCF;&#x4ECE;HBase &#x8BFB;&#x53D6;&#x5230;&#x4E00;&#x884C;&#x8BB0;&#x5F55;, &#x5C06;&#x6765;&#x8981;&#x5411;Mysql&#x7684; tb_contacts &#x5199;&#x5165; 3 &#x6761;&#x8BB0;&#x5F55;
          */</span>
        <span class="token comment">// &#x5C01;&#x88C5;&#x65E5;&#x7EF4;&#x5EA6;</span>
        dateDimension<span class="token punctuation">.</span><span class="token function">setYear</span><span class="token punctuation">(</span>year<span class="token punctuation">)</span><span class="token punctuation">;</span>
        dateDimension<span class="token punctuation">.</span><span class="token function">setMonth</span><span class="token punctuation">(</span>month<span class="token punctuation">)</span><span class="token punctuation">;</span>
        dateDimension<span class="token punctuation">.</span><span class="token function">setDay</span><span class="token punctuation">(</span>day<span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token comment">// &#x5199;&#x51FA;&#x53BB;r&#x7EF4;&#x5EA6;</span>
        context<span class="token punctuation">.</span><span class="token function">write</span><span class="token punctuation">(</span>commonDimension<span class="token punctuation">,</span> v<span class="token punctuation">)</span><span class="token punctuation">;</span>


        <span class="token comment">// &#x5C01;&#x88C5;&#x6708;&#x7EF4;&#x5EA6;  &#x628A;&#x65E5;&#x671F;&#x6539;&#x4E3A;-1</span>
        dateDimension<span class="token punctuation">.</span><span class="token function">setDay</span><span class="token punctuation">(</span><span class="token string">&quot;-1&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        context<span class="token punctuation">.</span><span class="token function">write</span><span class="token punctuation">(</span>commonDimension<span class="token punctuation">,</span> v<span class="token punctuation">)</span><span class="token punctuation">;</span>

        <span class="token comment">// &#x5C01;&#x88C5;&#x5E74;&#x7EF4;&#x5EA6; &#x628A;&#x6708;&#x548C;&#x65E5;&#x671F;&#x90FD;&#x6539;&#x4E3A;-1</span>
        dateDimension<span class="token punctuation">.</span><span class="token function">setMonth</span><span class="token punctuation">(</span><span class="token string">&quot;-1&quot;</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        context<span class="token punctuation">.</span><span class="token function">write</span><span class="token punctuation">(</span>commonDimension<span class="token punctuation">,</span> v<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre>
<h2 id="3-&#x7C7B;callreducer">3. &#x7C7B;:<code>CallReducer</code></h2>
<pre class="language-"><code class="lang-java"><span class="token keyword">package</span> com<span class="token punctuation">.</span>atguigu<span class="token punctuation">.</span>dataanalasis<span class="token punctuation">.</span>mapred<span class="token punctuation">;</span>

<span class="token keyword">import</span> com<span class="token punctuation">.</span>atguigu<span class="token punctuation">.</span>dataanalasis<span class="token punctuation">.</span>bean<span class="token punctuation">.</span>CommonDimension<span class="token punctuation">;</span>
<span class="token keyword">import</span> com<span class="token punctuation">.</span>atguigu<span class="token punctuation">.</span>dataanalasis<span class="token punctuation">.</span>bean<span class="token punctuation">.</span>CountDurationValue<span class="token punctuation">;</span>
<span class="token keyword">import</span> org<span class="token punctuation">.</span>apache<span class="token punctuation">.</span>hadoop<span class="token punctuation">.</span>io<span class="token punctuation">.</span>Text<span class="token punctuation">;</span>
<span class="token keyword">import</span> org<span class="token punctuation">.</span>apache<span class="token punctuation">.</span>hadoop<span class="token punctuation">.</span>mapreduce<span class="token punctuation">.</span>Reducer<span class="token punctuation">;</span>

<span class="token keyword">import</span> java<span class="token punctuation">.</span>io<span class="token punctuation">.</span>IOException<span class="token punctuation">;</span>

<span class="token keyword">public</span> <span class="token keyword">class</span> <span class="token class-name">CallReducer</span> <span class="token keyword">extends</span> <span class="token class-name">Reducer</span><span class="token generics function"><span class="token punctuation">&lt;</span>CommonDimension<span class="token punctuation">,</span> Text<span class="token punctuation">,</span> CommonDimension<span class="token punctuation">,</span> CountDurationValue<span class="token punctuation">&gt;</span></span> <span class="token punctuation">{</span>
    <span class="token keyword">private</span> CountDurationValue countDurationValue <span class="token operator">=</span> <span class="token keyword">new</span> <span class="token class-name">CountDurationValue</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

    <span class="token annotation punctuation">@Override</span>
    <span class="token keyword">protected</span> <span class="token keyword">void</span> <span class="token function">reduce</span><span class="token punctuation">(</span>CommonDimension key<span class="token punctuation">,</span> Iterable<span class="token generics function"><span class="token punctuation">&lt;</span>Text<span class="token punctuation">&gt;</span></span> values<span class="token punctuation">,</span> Context context<span class="token punctuation">)</span> <span class="token keyword">throws</span> IOException<span class="token punctuation">,</span> InterruptedException <span class="token punctuation">{</span>
        <span class="token keyword">int</span> countSum <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">;</span>
        <span class="token keyword">int</span> durationSum <span class="token operator">=</span> <span class="token number">0</span><span class="token punctuation">;</span>

        <span class="token keyword">for</span> <span class="token punctuation">(</span>Text value <span class="token operator">:</span> values<span class="token punctuation">)</span> <span class="token punctuation">{</span>
            durationSum <span class="token operator">+=</span> Integer<span class="token punctuation">.</span><span class="token function">parseInt</span><span class="token punctuation">(</span>value<span class="token punctuation">.</span><span class="token function">toString</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            countSum<span class="token operator">++</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span>

        <span class="token comment">// &#x628A;&#x4E24;&#x4E2A;&#x503C;&#x5C01;&#x88C5;&#x5230;&#x5BF9;&#x8C61;&#x4E2D;</span>
        countDurationValue<span class="token punctuation">.</span><span class="token function">setCountSum</span><span class="token punctuation">(</span>countSum<span class="token punctuation">)</span><span class="token punctuation">;</span>
        countDurationValue<span class="token punctuation">.</span><span class="token function">setDurationSum</span><span class="token punctuation">(</span>durationSum<span class="token punctuation">)</span><span class="token punctuation">;</span>

        <span class="token comment">// &#x5199;&#x51FA;&#x6570;&#x636E;, &#x7136;&#x540E;&#x8BA9;output&#x6765;&#x5904;&#x7406;&#x6570;&#x636E;&#x5E94;&#x8BE5;&#x5982;&#x4F55;&#x5199;&#x5230; Mysql &#x4E2D;</span>
        context<span class="token punctuation">.</span><span class="token function">write</span><span class="token punctuation">(</span>key<span class="token punctuation">,</span> countDurationValue<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span>
</code></pre>
<footer class="page-footer"><span class="copyright">Copyright &#xA9; &#x5C1A;&#x7845;&#x8C37;&#x5927;&#x6570;&#x636E; 2019 all right reserved&#xFF0C;powered by Gitbook</span><span class="footer-modification"><br>&#x8BE5;&#x6587;&#x4EF6;&#x6700;&#x540E;&#x4FEE;&#x8BA2;&#x65F6;&#x95F4;&#xFF1A;
2018-11-27 16:04:01
</span></footer>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="3342-53053a-com-atguigu-dataanalasis-conversion.html" class="navigation navigation-prev " aria-label="Previous page: 3.3.4.2 包: com.atguigu.dataanalasis.conversion">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="3344-53053a-com-atguigu-dataanalasis-outputformat.html" class="navigation navigation-next " aria-label="Next page: 3.3.4.4 包:com.atguigu.dataanalasis.outputformat">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"3.3.4.3 包:com.atguigu.dataanalasis.mapred","level":"1.3.3.4.3","depth":4,"next":{"title":"3.3.4.4 包:com.atguigu.dataanalasis.outputformat","level":"1.3.3.4.4","depth":4,"path":"di-3-zhang-xiang-shi-xian/33-shu-ju-fen-xi/334-xu-qiu-shi-xian/3344-53053a-com-atguigu-dataanalasis-outputformat.md","ref":"di-3-zhang-xiang-shi-xian/33-shu-ju-fen-xi/334-xu-qiu-shi-xian/3344-53053a-com-atguigu-dataanalasis-outputformat.md","articles":[]},"previous":{"title":"3.3.4.2 包: com.atguigu.dataanalasis.conversion","level":"1.3.3.4.2","depth":4,"path":"di-3-zhang-xiang-shi-xian/33-shu-ju-fen-xi/334-xu-qiu-shi-xian/3342-53053a-com-atguigu-dataanalasis-conversion.md","ref":"di-3-zhang-xiang-shi-xian/33-shu-ju-fen-xi/334-xu-qiu-shi-xian/3342-53053a-com-atguigu-dataanalasis-conversion.md","articles":[]},"dir":"ltr"},"config":{"plugins":["splitter","expandable-chapters-small","page-toc-button","-highlight","prism","prism-themes","tbfed-pagefooter","sitemap","change_girls","livereload"],"styles":{"website":"styles/website.css","ebook":"styles/ebook.css","pdf":"styles/pdf.css","mobi":"styles/mobi.css","epub":"styles/epub.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"Copyright &copy 尚硅谷大数据 2019","modify_label":"<br>该文件最后修订时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"prism":{"css":["prismjs/themes/prism-solarizedlight.css"]},"disqus":{"shortName":"zhenchao125"},"livereload":{},"splitter":{},"change_girls":{"time":30,"urls":["http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/62171757.jpg-atguiguImg","http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/83394736.jpg-atguiguImg","http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/15906185.jpg-atguiguImg","http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/15906185.jpg-atguiguImg","http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/3394270.jpg-atguiguImg","http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/65028582.jpg-atguiguImg","http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/20359261.jpg-atguiguImg","http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/37472401.jpg-atguiguImg","http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/3355397.jpg-atguiguImg","http://lizhenchao.oss-cn-shenzhen.aliyuncs.com/imgs/18-3-4/11075549.jpg-atguiguImg"]},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"fontsettings":{"theme":"white","family":"sans","size":2},"sitemap":{"hostname":"http://bigdataatguigu.applinzi.com/"},"page-toc-button":{"maxTocDepth":3,"minTocSize":2},"prism-themes":{},"expandable-chapters-small":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"theme":"default","author":" 李振超","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"大数据 bigdata_telecom_project_atguigu 课堂笔记","language":"zh-hans","links":{"sidebar":{"联系我们":"http://www.atguigu.com/"}},"gitbook":"*","description":"课堂笔记,学生提前预习"},"file":{"path":"di-3-zhang-xiang-shi-xian/33-shu-ju-fen-xi/334-xu-qiu-shi-xian/3343-53053a-com-atguigu-dataanalasis-mapred.md","mtime":"2018-11-27T08:04:01.218Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2019-09-11T00:27:37.149Z"},"basePath":"../../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../../gitbook/gitbook.js"></script>
    <script src="../../../gitbook/theme.js"></script>
    
        
        <script src="../../../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-expandable-chapters-small/expandable-chapters-small.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-page-toc-button/plugin.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-change_girls/girls.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-livereload/plugin.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-search/search-engine.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-search/search.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

